import request from '@/utils/request'

export function userList() {
  return request({
    url: '/user/list',
    method: 'get'
  })
}
export function enable(data) {
  return request({
    url: '/user/enable/' + data,
    method: 'put'
  })
}

export function disable(data) {
  return request({
    url: '/user/disable/' + data,
    method: 'put'
  })
}
export function deleted(data) {
  return request({
    url: '/user/delete/' + data,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: '/user/edit',
    method: 'post',
    data
  })
}
export function updatePassword(data) {
  return request({
    url: '/user/updatePassword',
    method: 'post',
    data
  })
}
export function create(data) {
  return request({
    url: '/user/create',
    method: 'post',
    data
  })
}
export function verifyAccount(account) {
  return request({
    url: '/user/verifyAccount/' + account,
    method: 'get'
  })
}
export function getByToken() {
  return request({
    url: '/user/getByToken',
    method: 'get'
  })
}

export function getById(account) {
  return request({
    url: '/user/getById/' + account,
    method: 'get'
  })
}
